package net.caidingke.shepherd.domain.user;

import io.ebean.annotation.Cache;
import lombok.Data;
import lombok.EqualsAndHashCode;
import net.caidingke.shepherd.domain.BaseModel;
import net.caidingke.shepherd.domain.user.finder.PermissionFinder;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

/**
 * @author bowen.
 */
@Entity
@Data
@EqualsAndHashCode(callSuper = true)
@Cache
public class Permission extends BaseModel {

    public static final String MODIFY_PASSWORD = "modify-password";

    public static final PermissionFinder F = new PermissionFinder();

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    private String name;

    private String displayName;

    private String url;

    private String permission;
}
